<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- <input type="text" @input="handleInput"> -->
        <input type="text" v-model="val">
        <ul>
            <li v-for="item in update()">
                {{item}}
            </li>
        </ul>

    </div>


</body>

<script>
    var vm = new Vue({
        el: "#app",
        data: {
            val: "",
            list: ["aa", "ba", "ccc", "db"],
            // bflist: ["aa", "ba", "ccc", "db"]

        },
        methods: {
            // handleInput(eve) {
            //     // concat合并
            //     this.list = this.bflist.filter(item => item.includes(eve.target.value));
            // }
            update() {
                return this.list.filter(item => item.includes(this.val));
            }

        }
    })
</script>

</html>